1. Field of the Invention
The present invention relates to a color imaging apparatus such as a digital camera. In particular, the present invention relates to an imaging apparatus having a color image data measuring function, and to a method of measuring a color image data used therefor.
2. Description of the Related Art
Conventionally, a digital camera has various functions as described below. One is an auto-focus (AF) function of automatically focusing an object. Another is an auto-exposure (AE) function of automatically determining exposure. Another is an auto white balance (AWB) function of correcting the difference of color tone variable by light source, and automatically adjusting white balance. Users can obtain high-quality image data with a simple operation using the foregoing functions.
Conventionally, there have been known various proposals relevant to the method of measuring RGB data required for controlling the foregoing functions. Usually, this kind of digital camera is provided with an RGB measurement circuit as hardware. The RGB measurement circuit measures RGB data for each pixel of an image, and evaluates the measured result, thereby controlling the various functions described above. In general, the RGB measurement circuit is composed of circuits for integrating each color component of the RGB data for each predetermined area.
A conventional RGB measurement circuit used for a digital camera will be explained below with reference to FIG. 1 to FIG. 4. FIG. 1 is a block diagram showing the configuration of pre-processor circuit in the conventional digital camera. FIG. 2 is a block diagram showing the configuration of post-processor circuit. FIG. 3 is a block diagram showing the configuration of an RGB measurement circuit built in the pre-processor circuit. FIG. 4 is a chart showing the relationship between images and area numbers.
In the digital camera, the output of imaging device, that is, a charge coupled device (CCD) is colorized using a color filter having three primary colors R, G and B arrayed in a predetermined sequence. The output of the CCD is an electric signal (analog signal). The output signal is converted into a digital signal by an analog processing circuit located on the post-stage of the CCD, and thereafter, input to a signal processing circuit calling pre-process. The entire system configuration of the digital camera will be described later with reference to FIG. 5.
As shown in FIG. 1, a pre-processor circuit 21 is composed of defect correction circuit 31, black level detection/correction circuit 32 and RGB gain control circuit 33. The defect correction circuit 31 corrects a pixel of CCD having defect using neighboring pixels. The black level detection/correction circuit 32 detects a black level portion of an image, and corrects it into a proper value. The RGB gain control circuit 33 makes an RGB gain control. CCD data processed via the pre-processor circuit 21 is loaded into a buffer memory comprising DRAM, and thereafter, supplied to a post-processor circuit 22 as seen from FIG. 2.
The “CCD data” means a signal, which is successively output from the CCD at the unit of pixel according to the color array of the color filter. For example, if a primary color filter having primary colors R, G and B arrayed like a Bayer array is used, the CCD data is also called as “primary color lattice array data). The “RGB data” means data having averaged R, G and B color component values for each pixel, and also, is called “color data”.
The post-processor circuit 22 is a signal processing circuit for carrying out color process with respect to the CCD data loaded into the buffer memory. The post-processor circuit 22 is composed of interpolation circuit 41, RGB gain control circuit 42, color control circuit 43, gamma converter circuit 44, RGB/YUV converter circuit 45 and filtering circuit 46. The interpolation circuit 41 interpolates color lacking for each pixel to generate RGB color data. The RGB gain control circuit 42 makes the gain control of the RGB data generated by the interpolation circuit 41. The color control circuit 43 is used for emphasizing a predetermined color. The gamma converter circuit 44 makes a conversion in accordance with gamma characteristics of display. The RGB/YUV converter circuit 45 makes a conversion from RGB signal into YUV signal. The filtering circuit 46 shapes the waveform of the YUV signal.
The foregoing color process by the post-processor circuit 22 is made, and thereby, image data composed of a luminance signal equivalent to one screen and color difference signal is generated. The image data is displayed on a display device while being compressed according to a predetermined format at a depressed timing of a shutter key, and recorded in memory.
In the conventional digital camera, an RGB measurement circuit 50 is built in the pre-processor circuit 21 as seen from FIG. 1, and RGB measurement is made using CCD output data before being loaded into the buffer memory.
In FIG. 3, there is shown the configuration of the RGB measurement circuit 50. The RGB measurement circuit 50 is composed of coordinate counter 51, area determination circuit 52, integrator 53, selector 54 and register groups 55a to 55c. 
The CCD data extracted from the output section of the pre-processor circuit 21 is separated into data for each RGB color component, and input to the integrator 53. On the other hand, the coordinate counter 51 generates an input value coordinate. Here, the measuring object image is divided into a predetermined-size area (e.g., 16×16=256). In this case, the area determination circuit 52 determines that the input value coordinate from the coordinate counter 51 belongs to which area, and thereafter, outputs the area number to the integrator 53.
FIG. 4 shows the corresponding relationship between images and areas. For example, if the image is divided into areas (16×16=256), area numbers 0 to 255 is given for each area.
Register groups 55a to 55c comprises 256 registers corresponding to the number of divided areas of the image. Each register is provided corresponding to the area numbers 0 to 255. The register groups are prepared for each color in a manner that the register group 55a is used for R data, the register group 55b is used for G data, and the register group 55c is used for B data. The selector 54 selects the register groups 55a to 55c in accordance with R, G and B color data successively input to the integrator 53 in time series.
With the foregoing configuration, when the area number of the input value determined by the area determination circuit 52 is input to the integrator 53, the integrator 53 measures R, G and B values (integration value) relevant to the area number. In this case, R, G and B color data are successively input to the integrator 53; for this reason, measurement is made for each color while the selector 54 selects the register groups 55a to 55c. 
For example, if R data is input to the integrator 53, the selector 54 selects the register group 55a for R data. In this state, the integrator 53 reads the value corresponding to the area number output from the area determination circuit 52 from the corresponding register of the register group 55a. Further, the integrator 53 adds the input value to the read value, and thereafter, write it as integration result. Measurement relevant to other color data is carried out in the same manner as described above. In brief, when G data is input, the selector 54 selects the register group 55b for G data, and the integrator 53 reads the value corresponding to the area number from the register group 55b. The integrator 53 adds the input value to the read value, and thereafter, writes it. Likewise, when B data is input, the selector 54 selects the register group 55c for B data, and the integrator 53 reads the value corresponding to the area number from the register group 55c. The integrator 53 adds the input value to the read value, and thereafter, writes it.
In this manner, R, G and B values (integration value) of each area of the image are successively measured, and thereafter, the measured result is stored in register groups 55a to 55c corresponding to each color. The RGB measured results stored in these register groups 55a to 55c are read via control unit, that is, CPU, and used for the control of AE and AWB functions.